/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    padding: 0;
    overflow-y: auto;
    flex-shrink: 0;
}

/* 侧边栏收缩后的样式 */
.sidebar.collapsed {
    width: 60px;
}

/* 侧边栏收缩按钮 */
.sidebar-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* 菜单组样式 */
.menu-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 菜单组标题 */
.menu-group h3 {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    margin: 0;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-group h3:hover {
    background-color: #34495e;
}

/* 展开/收缩箭头图标 */
.menu-group h3 .toggle-icon {
    transition: transform 0.3s;
}

.menu-group h3 .toggle-icon.collapsed {
    transform: rotate(-90deg);
}

/* 子菜单列表 */
.menu-group ul {
    list-style: none;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* 收起的子菜单 */
.menu-group ul.collapsed {
    max-height: 0;
}

.menu-group li {
    padding: 12px 20px 12px 40px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.menu-group li:hover {
    background-color: #34495e;
    border-left: 4px solid #3498db;
}

.menu-group li.active {
    background-color: #3498db;
    border-left: 4px solid #2980b9;
    color: white;
}

/* 高亮显示当前选中的导航项 */
.menu-group li.current {
    background-color: #3498db;
    color: white;
}

/* 内容区域样式 */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-header h1 {
    font-size: 22px;
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
}

.username {
    margin-right: 15px;
    font-size: 14px;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* 模块内容区域 */
#module-content {
    flex: 1;
    padding: 20px 30px;
    overflow-y: auto;
}

.welcome-screen {
    text-align: center;
    padding: 40px 0;
}

.welcome-screen h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.welcome-screen p {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* 仪表盘样式 */
.dashboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.dashboard-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 220px;
    text-align: center;
}

.dashboard-item h3 {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.dashboard-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

/* 库存盘点预警样式 */
.inventory-alert {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inventory-alert h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.alert-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.alert-card {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.alert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.alert-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 15px;
    font-size: 24px;
}

.alert-blue {
    background-color: #e3f2fd;
    color: #2196f3;
}

.alert-orange {
    background-color: #fff3e0;
    color: #ff9800;
}

.alert-red {
    background-color: #fdecea;
    color: #f44336;
}

.alert-info {
    flex: 1;
}

.alert-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.alert-label {
    font-size: 14px;
    color: #666;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 800px;
}

.search-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    background-color: #fafafa;
    font-size: 14px;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    flex: 1;
    font-size: 14px;
}

.search-btn {
    padding: 10px 15px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #1976d2;
}

.add-btn {
    padding: 10px 16px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.add-btn:hover {
    background-color: #388e3c;
}

.inventory-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.inventory-table th {
    background-color: #f5f5f5;
    color: #333;
    padding: 15px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.inventory-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.inventory-table tr:last-child td {
    border-bottom: none;
}

.inventory-table tr:hover {
    background-color: #f9f9f9;
}

.status-normal {
    background-color: #e8f5e9;
    color: #388e3c;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-warning {
    background-color: #fff8e1;
    color: #ffa000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-danger {
    background-color: #ffebee;
    color: #d32f2f;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-overstock {
    background-color: #e8eaf6;
    color: #3f51b5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.alert-level {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.alert-level-high {
    background-color: #ffebee;
    color: #d32f2f;
}

.alert-level-medium {
    background-color: #fff8e1;
    color: #ffa000;
}

.alert-level-low {
    background-color: #e8f5e9;
    color: #388e3c;
}

.operation-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px;
}

.btn-view {
    background-color: #e3f2fd;
    color: #1976d2;
}

.btn-view:hover {
    background-color: #bbdefb;
}

.btn-edit {
    background-color: #fff8e1;
    color: #f57c00;
}

.btn-edit:hover {
    background-color: #ffe0b2;
}

.btn-delete {
    background-color: #ffebee;
    color: #c62828;
}

.btn-delete:hover {
    background-color: #ffcdd2;
}

/* 模态框样式 */
.inventory-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: modal-slide-in 0.3s ease;
}

@keyframes modal-slide-in {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.close-modal {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.inventory-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #2196f3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 12px;
}

.form-actions {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-save, .btn-primary {
    padding: 10px 20px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-save:hover, .btn-primary:hover {
    background-color: #1976d2;
}

.btn-cancel, .btn-secondary {
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn-cancel:hover, .btn-secondary:hover {
    background-color: #e0e0e0;
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: #2196F3;
}

.toggle-switch input:checked + label:before {
    transform: translateX(26px);
}

/* 详情页样式 */
.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.detail-value.highlight {
    color: #1976d2;
    font-weight: 600;
}

.detail-note {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(-100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 2000;
    max-width: 350px;
}

.notification-show {
    transform: translateY(0);
    opacity: 1;
}

.notification-hidden {
    transform: translateY(-100px);
    opacity: 0;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.notification-message {
    flex: 1;
    margin-right: 15px;
    font-size: 14px;
    color: #333;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.notification-close:hover {
    color: #333;
}

.notification-info {
    border-left: 4px solid #2196f3;
}

.notification-success {
    border-left: 4px solid #4caf50;
}

.notification-warning {
    border-left: 4px solid #ff9800;
}

.notification-error {
    border-left: 4px solid #f44336;
}

/* 搜索栏样式 */
.search-bar {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.search-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.search-btn:hover {
    background-color: #2980b9;
}

/* 表格样式 */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.inventory-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.inventory-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.inventory-table tr:hover {
    background-color: #f5f5f5;
}

.status-normal {
    color: #27ae60;
}

.status-warning {
    color: #f39c12;
}

.status-danger {
    color: #e74c3c;
}

.operation-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    margin-right: 5px;
    cursor: pointer;
    font-size: 12px;
}

.btn-view {
    background-color: #3498db;
    color: white;
}

.btn-edit {
    background-color: #2ecc71;
    color: white;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-style: italic;
}

/* 模块头部样式 */
.module-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

.module-header h2 {
    color: #2c3e50;
    font-size: 22px;
}

/* 商品表单样式 */
.product-form-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.product-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-actions {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.btn-save {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-save:hover {
    background-color: #2980b9;
}

.btn-reset {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-reset:hover {
    background-color: #7f8c8d;
}

/* 商品列表样式 */
.product-list-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.product-list-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.table-container {
    overflow-x: auto;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.product-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.product-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.product-table tr:hover {
    background-color: #f5f5f5;
}

.btn-edit-product, .btn-delete-product {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.btn-edit-product {
    background-color: #2ecc71;
    color: white;
}

.btn-edit-product:hover {
    background-color: #27ae60;
}

.btn-delete-product {
    background-color: #e74c3c;
    color: white;
}

.btn-delete-product:hover {
    background-color: #c0392b;
}

.no-data {
    text-align: center;
    color: #95a5a6;
    padding: 20px;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    padding: 15px;
}

/* 促销活动管理模块样式 */
.promotion-form-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.promotion-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.date-time-group {
    display: flex;
    gap: 10px;
}

.date-time-group .form-control {
    flex: 1;
}

.promotion-form .form-control[type="number"] {
    width: 100%;
}

.promotion-description {
    grid-column: span 2;
}

.promotion-description textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
}

.promotion-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.promotion-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.promotion-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.promotion-table tr:hover {
    background-color: #f5f5f5;
}

.status-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-ongoing {
    background-color: #e3f2fd;
    color: #2196f3;
}

.status-pending {
    background-color: #fff3e0;
    color: #ff9800;
}

.status-ended {
    background-color: #f5f5f5;
    color: #9e9e9e;
}

.btn-create {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #673ab7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    float: right;
    margin-top: 20px;
}

.btn-create:hover {
    background-color: #5e35b1;
}

.btn-create .icon {
    margin-right: 8px;
    font-size: 18px;
}

.btn-delete-promotion {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.btn-edit-promotion {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    background-color: #2ecc71;
    color: white;
}

.btn-edit-promotion:hover {
    background-color: #27ae60;
}

.btn-delete-promotion {
    background-color: #e74c3c;
    color: white;
}

.btn-delete-promotion:hover {
    background-color: #c0392b;
}
/* 分类管理样式 */
.form-control.category-description {
    width: 100%;
    min-height: 100px;
    resize: vertical;
}

.form-group textarea.form-control {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.btn-edit-category, .btn-delete-category {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.btn-edit-category {
    background-color: #2ecc71;
    color: white;
}

.btn-edit-category:hover {
    background-color: #27ae60;
}

.btn-delete-category {
    background-color: #e74c3c;
    color: white;
}

.btn-delete-category:hover {
    background-color: #c0392b;
}

/* 价格管理样式 */
.btn-delete-price-adjustment {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    background-color: #e74c3c;
    color: white;
}

.btn-delete-price-adjustment:hover {
    background-color: #c0392b;
}

.price-change-positive {
    color: #27ae60;
}

.price-change-negative {
    color: #e74c3c;
}

#current-price {
    background-color: #f9f9f9;
    font-weight: 600;
}

#price-reason {
    min-height: 80px;
}

/* 仓库管理样式 */
.warehouse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.warehouse-table th {
    background-color: #f8f9fa;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.warehouse-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

.warehouse-table tr:hover {
    background-color: #f5f5f5;
}

.btn-edit-warehouse, .btn-delete-warehouse {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.btn-edit-warehouse {
    background-color: #2ecc71;
    color: white;
}

.btn-edit-warehouse:hover {
    background-color: #27ae60;
}

.btn-delete-warehouse {
    background-color: #e74c3c;
    color: white;
}

.btn-delete-warehouse:hover {
    background-color: #c0392b;
}

#warehouse-description, #edit-warehouse-description {
    min-height: 80px;
}

/* 商品入库记录表格样式改进 */
.stock-in-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.stock-in-table th {
    background-color: #3498db;
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.stock-in-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
    line-height: 1.4;
}

.stock-in-table tr:last-child td {
    border-bottom: none;
}

.stock-in-table tr:hover {
    background-color: #f5f9fd;
}

.stock-in-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.stock-in-table .batch-number,
.stock-in-table .entry-date {
    text-align: center;
    white-space: nowrap;
}

.stock-in-table .quantity {
    text-align: right;
    font-weight: 500;
    font-size: 15px;
}

.btn-view-stock-in,
.btn-delete-stock-in {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 6px;
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-view-stock-in {
    background-color: #3498db;
}

.btn-view-stock-in:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-delete-stock-in {
    background-color: #e74c3c;
}

.btn-delete-stock-in:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.record-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.detail-group:hover {
    background-color: #edf3f8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-group.full-width {
    grid-column: span 2;
}

.detail-item {
    display: flex;
    align-items: baseline;
    margin-bottom: 5px;
}

.detail-label {
    color: #7f8c8d;
    font-weight: 500;
    width: 100px;
    flex-shrink: 0;
    font-size: 14px;
}

.detail-value {
    color: #2c3e50;
    font-weight: 500;
    flex-grow: 1;
    font-size: 15px;
}

.detail-value.highlight {
    font-weight: 700;
    color: #2c3e50;
}

.detail-note {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    border-left: 3px solid #e74c3c;
}

/* 出库记录详情样式 */
.stock-out-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.stock-out-reason {
    background-color: #fdedec;
    border-left: 4px solid #e74c3c;
}

/* 出库管理表单样式优化 */
.stock-out-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 15px;
    padding: 10px;
}

.stock-out-form .form-group {
    position: relative;
    margin-bottom: 10px;
}

.stock-out-form label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.stock-out-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.stock-out-form .form-control:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
    background-color: #fff;
    outline: none;
}

.stock-out-form select.form-control {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8" viewBox="0 0 14 8"><path fill="%23555" d="M1 1L7 7L13 1" stroke="%23555" stroke-width="2" stroke-linecap="round" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    cursor: pointer;
}

.stock-out-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.stock-out-form .stock-hint {
    display: block;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 6px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.stock-out-form .form-actions {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.stock-out-form .btn-primary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background-color: #e74c3c;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
    font-size: 14px;
    letter-spacing: 0.5px;
}

.stock-out-form .btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

.stock-out-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(231, 76, 60, 0.4);
}

.stock-out-form .btn-secondary {
    padding: 12px 24px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    background-color: #ffffff;
    color: #606266;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.stock-out-form .btn-secondary:hover {
    background-color: #f2f6fc;
    border-color: #c6e2ff;
    color: #409eff;
}

.stock-out-form .btn-secondary:active {
    background-color: #ecf5ff;
}

/* 出库详情模态框样式 */
.stock-out-modal .modal-content {
    border-radius: 12px;
    overflow: hidden;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    animation: modal-appear 0.3s ease-out;
    border: none;
}

.stock-out-modal .modal-header {
    background-color: #e74c3c;
    color: white;
    padding: 18px 25px;
    position: relative;
}

.stock-out-modal .modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

.stock-out-modal .close-modal {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.2s;
}

.stock-out-modal .close-modal:hover {
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.stock-out-modal .modal-body {
    padding: 30px;
}

.stock-out-modal .modal-footer {
    padding: 18px 30px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #eee;
}

/* 出库表格优化 */
.stock-out-table .reason-tag {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: inline-block;
    text-align: center;
    min-width: 70px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.add-stock-out-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-top: -45px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.2);
    letter-spacing: 0.5px;
}

.add-stock-out-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(231, 76, 60, 0.3);
}

.add-stock-out-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.add-stock-out-btn i {
    margin-right: 10px;
    font-size: 16px;
}

/* 搜索头部样式优化 */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.search-header h2 {
    margin: 0;
}

.search-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.search-input, 
.search-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-input:focus, 
.search-select:focus {
    border-color: #3498db;
    outline: none;
}

.search-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #2980b9;
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .record-detail {
        grid-template-columns: 1fr;
    }
    
    .detail-group.full-width {
        grid-column: auto;
    }
}

/* 入库单高亮提示效果 */
.status-pending {
    color: #e67e22;
    font-weight: 500;
}

.status-cancelled {
    color: #e74c3c;
    font-weight: 500;
}

.status-completed {
    color: #27ae60;
    font-weight: 500;
}

/* 查看出库记录详情的样式优化 */
.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
}

.detail-label {
    min-width: 120px;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
}

.detail-value {
    flex: 1;
    color: #333;
    font-size: 14px;
    font-weight: 400;
}

.detail-value.highlight {
    font-weight: 700;
    color: #2c3e50;
}

.detail-note {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    border-left: 3px solid #e74c3c;
}

/* 出库原因标签样式 */
.reason-sales {
    background-color: #27ae60;
}

.reason-damaged {
    background-color: #e74c3c;
}

.reason-expired {
    background-color: #f39c12;
}

.reason-transfer {
    background-color: #3498db;
}

.reason-other {
    background-color: #95a5a6;
}

/* 商品出库管理样式 */
.stock-out-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.stock-out-table th {
    background-color: #e74c3c;
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.stock-out-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
    line-height: 1.4;
}

.stock-out-table tr:last-child td {
    border-bottom: none;
}

.stock-out-table tr:hover {
    background-color: #fef5f4;
}

.stock-out-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.stock-out-table .batch-number,
.stock-out-table .out-date {
    text-align: center;
    white-space: nowrap;
}

.stock-out-table .quantity {
    text-align: right;
    font-weight: 500;
    font-size: 15px;
}

.btn-view-stock-out,
.btn-edit-stock-out,
.btn-delete-stock-out {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 6px;
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-view-stock-out {
    background-color: #3498db;
}

.btn-view-stock-out:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-edit-stock-out {
    background-color: #2ecc71;
}

.btn-edit-stock-out:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn-delete-stock-out {
    background-color: #e74c3c;
}

.btn-delete-stock-out:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

/* 收银结算模块样式 */
.checkout-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.checkout-header h2 {
    font-size: 24px;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.checkout-header p {
    font-size: 14px;
    opacity: 0.8;
}

.checkout-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 240px);
}

.checkout-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 60%;
}

.checkout-right {
    flex: 1;
    max-width: 40%;
}

.search-product-section {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-wrapper {
    display: flex;
    gap: 10px;
}

.product-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.product-search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-product-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-product-btn:hover {
    background-color: #2980b9;
}

.product-list-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.section-header h3 {
    font-size: 16px;
    margin: 0;
    color: #2c3e50;
}

.product-count {
    font-size: 14px;
    color: #7f8c8d;
}

.products-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.checkout-products-table {
    width: 100%;
    border-collapse: collapse;
}

.checkout-products-table th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    border-bottom: 2px solid #eee;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    z-index: 1;
}

.checkout-products-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.checkout-products-table tr:hover {
    background-color: #f5f7fa;
}

.product-price {
    font-weight: 500;
    color: #2c3e50;
}

.product-stock {
    text-align: center;
}

.out-of-stock {
    color: #e74c3c;
    font-weight: bold;
}

.low-stock {
    color: #f39c12;
    font-weight: bold;
}

.add-to-cart-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.add-to-cart-btn:hover {
    background-color: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cart-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    min-height: 200px;
    max-height: calc(100vh - 480px);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    border-bottom: 2px solid #eee;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    z-index: 1;
}

.cart-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.cart-table tr:hover {
    background-color: #f5f7fa;
}

.cart-empty {
    text-align: center;
    padding: 40px 0;
    font-size: 14px;
    color: #95a5a6;
    font-style: italic;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
}

.qty-btn:hover {
    background-color: #e0e0e0;
}

.qty-value {
    width: 30px;
    text-align: center;
    font-weight: 500;
}

.btn-remove {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove:hover {
    background-color: #c0392b;
}

.clear-cart-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.clear-cart-btn:hover {
    background-color: #c0392b;
}

.clear-cart-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.cart-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border-top: 1px solid #eee;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.summary-label {
    font-weight: 500;
    color: #2c3e50;
}

.summary-value {
    font-weight: 600;
    color: #2c3e50;
}

.discount-row {
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
    padding: 12px 0;
    margin: 5px 0;
}

.discount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discount-input {
    width: 80px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
}

.apply-discount-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.apply-discount-btn:hover {
    background-color: #2980b9;
}

.apply-discount-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.total-row {
    font-size: 16px;
    padding: 10px 0;
}

.total-amount {
    font-size: 18px;
    color: #e74c3c;
    font-weight: 700;
}

.payment-section {
    padding: 15px;
    border-top: 1px solid #eee;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.payment-method-btn {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    background-color: #f8f9fa;
    transition: all 0.2s;
}

.payment-method-btn:hover {
    border-color: #3498db;
    background-color: #ecf0f1;
}

.payment-method-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.2);
}

.checkout-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(231, 76, 60, 0.3);
}

.checkout-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(231, 76, 60, 0.2);
}

.checkout-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.checkout-modal-content {
    width: 500px;
    max-width: 90%;
    animation: modal-slide-in 0.3s;
}

.modal-closing {
    animation: fadeOut 0.3s;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.checkout-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.checkout-confirm-message {
    margin-top: 15px;
    padding: 15px;
    background-color: #e8f4f8;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.receipt-modal-content {
    width: 400px;
    max-width: 90%;
}

.receipt {
    background-color: #fff;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 20px 0;
}

.receipt-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 0 20px;
}

.receipt-header h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.receipt-items {
    margin-bottom: 15px;
    padding: 0 10px;
}

.receipt-items table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.receipt-items th, .receipt-items td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px dotted #ddd;
}

.receipt-items th {
    font-weight: bold;
}

.receipt-summary {
    padding: 0 20px;
    margin-bottom: 15px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.receipt-row.total {
    font-weight: bold;
    border-top: 1px dashed #000;
    padding-top: 5px;
    margin-top: 5px;
}

.receipt-footer {
    text-align: center;
    padding: 15px 20px 0;
    border-top: 1px dotted #ddd;
    font-size: 11px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #eee;
}

.btn-print, .btn-close, .btn-confirm, .btn-cancel {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-print {
    background-color: #2ecc71;
    color: white;
}

.btn-print:hover {
    background-color: #27ae60;
}

.btn-close, .btn-cancel {
    background-color: #ecf0f1;
    color: #7f8c8d;
}

.btn-close:hover, .btn-cancel:hover {
    background-color: #dfe4ea;
}

.btn-confirm {
    background-color: #3498db;
    color: white;
}

.btn-confirm:hover {
    background-color: #2980b9;
}

.no-search-results {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
    font-style: italic;
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .checkout-container {
        flex-direction: column;
        height: auto;
    }
    
    .checkout-left, .checkout-right {
        max-width: 100%;
    }
    
    .cart-wrapper {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 添加会员模块相关样式 */
.member-section {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.member-search {
    display: flex;
    margin-bottom: 10px;
}

.member-phone-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-member-btn {
    margin-left: 8px;
    padding: 8px 15px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-member-btn:hover {
    background-color: #3982d8;
}

.member-info {
    padding: 8px 0;
}

.member-card {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background-color: #e9f5ff;
    border-radius: 4px;
    border-left: 4px solid #4a90e2;
}

.member-basic {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.member-name {
    font-weight: bold;
    color: #333;
}

.member-id {
    color: #666;
    font-size: 12px;
}

.member-details {
    display: flex;
    justify-content: space-between;
}

.member-points, .member-level {
    display: flex;
    align-items: center;
}

.points-label, .level-label {
    margin-right: 5px;
    color: #666;
    font-size: 13px;
}

.points-value {
    color: #ff6b6b;
    font-weight: bold;
}

.level-value {
    color: #38b2ac;
    font-weight: bold;
}

/* 积分相关样式 */
.points-row {
    margin-top: 5px;
}

#expected-points {
    color: #ff6b6b;
    font-weight: bold;
}

/* 销售统计模块样式 */
.sales-statistics-container {
    padding: 20px;
}

.filter-section {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.statistics-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
}

.stat-blue {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.stat-green {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.stat-orange {
    background-color: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.stat-purple {
    background-color: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: #777;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.sales-records-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sales-records-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
}

.sales-table th {
    background-color: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.sales-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.sales-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* 加载和错误提示样式 */
td.loading, td.error, td.empty {
    text-align: center;
    padding: 20px !important;
    color: #777;
}

td.error {
    color: #e74c3c;
}

td.empty {
    color: #777;
    font-style: italic;
}

/* 月度销售统计曲线图样式 */
.monthly-chart-section {
    margin: 20px 0;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.monthly-chart-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
    padding: 10px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 8px;
}

.legend-expenditure {
    background-color: #e74c3c;
}

/* 月度销售表格和曲线图布局 */
.monthly-data-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1200px) {
    .monthly-data-container {
        flex-direction: row;
    }
    
    .monthly-chart-section {
        flex: 3;
    }
    
    .monthly-stats-section {
        flex: 2;
    }
}

.chart-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 15px;
    color: #34495e;
}

/* 销售记录分页样式 */
.pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0 10px;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.pagination-btn.active {
    background-color: #e83e8c;
    color: white;
    border-color: #e83e8c;
    font-weight: 500;
}

.pagination-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

.pagination-ellipsis {
    color: #999;
    font-size: 14px;
    display: inline-block;
    margin: 0 5px;
}

.pagination-info {
    margin-left: 10px;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

/* 增加表格最小高度，避免分页切换时页面抖动 */
.sales-table {
    min-height: 450px;
}

.sales-table tbody {
    vertical-align: top;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-info {
        width: 100%;
        text-align: center;
        margin-top: 10px;
        margin-left: 0;
    }
}

/* 月度销售统计表格样式 */
.monthly-stats-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.monthly-stats-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.year-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-selector label {
    font-size: 14px;
    color: #666;
}

.year-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.year-select:focus {
    border-color: #e83e8c;
    box-shadow: 0 0 0 2px rgba(232, 62, 140, 0.1);
}

.monthly-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.monthly-table thead {
    background-color: #f8f9fa;
}

.monthly-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.monthly-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    vertical-align: middle;
}

.monthly-table tbody tr:hover {
    background-color: #f5f7fa;
}

.monthly-table .total-row {
    font-weight: 600;
    background-color: #f8f9fa;
}

.monthly-table .total-row td {
    border-top: 2px solid #e9ecef;
    color: #e83e8c;
}

.monthly-table .total-row td:first-child {
    color: #2c3e50;
}

.monthly-table td:nth-child(2),
.monthly-table td:nth-child(5),
.monthly-table td:nth-child(6) {
    color: #e83e8c;
    font-weight: 500;
}

.monthly-table td:nth-child(3),
.monthly-table td:nth-child(4) {
    text-align: center;
}

/* 成本核算模块样式 */
.cost-analysis-container {
    margin-top: 20px;
}

.cost-cards {
    margin-bottom: 30px;
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cost-table thead {
    background-color: #2c3e50;
    color: white;
}

.cost-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid #ddd;
}

.cost-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.cost-table tbody tr:hover {
    background-color: #f5f9ff;
}

.cost-table tbody tr.even-row {
    background-color: #f8f8f8;
}

.cost-table tfoot {
    background-color: #e8f4ff;
    font-weight: bold;
}

.cost-table tfoot td {
    border-top: 2px solid #88b7e6;
    border-bottom: none;
    padding: 12px 15px;
}

.text-right {
    text-align: right;
}

/* 操作按钮样式 */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #3498db;
    margin: 0 3px;
    padding: 3px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: #e8f4ff;
}

.view-btn {
    color: #2980b9;
}

.view-btn:hover {
    color: #1e70a9;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .cost-table thead, .cost-table tbody, .cost-table tfoot, .cost-table tr, .cost-table td, .cost-table th {
        display: block;
    }
    
    .cost-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .cost-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }
    
    .cost-table td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    
    .cost-table td:before {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
    }
    
    .text-right {
        text-align: right !important;
    }
}

/* 税务管理模块样式 */
.tax-cards {
    margin-bottom: 30px;
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tax-table th {
    background-color: #2c3e50;
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid #ddd;
}

.tax-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.tax-table tr:hover {
    background-color: #f5f9ff;
}

.tax-table .no-data,
.tax-table .loading,
.tax-table .error-message {
    text-align: center;
    padding: 20px;
}

.tax-table td:last-child,
.tax-table th:last-child {
    text-align: center;
}

.btn-export {
    background-color: #3498db;
    border: none;
    padding: 6px 12px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-export:hover {
    background-color: #2980b9;
}

.tax-analysis-container .filter-section {
    margin-bottom: 20px;
}

.tax-analysis-container .search-bar .search-select {
    width: 150px;
    margin: 0 10px;
}

/* 覆盖式modal弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-overlay .modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    max-width: 700px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: modal-slide-in 0.3s;
}